1. Field of the Invention
The present invention relates to a communication control apparatus which controls data communication, and particularly, to a communication control apparatus by a CSMA/CD (carrier Sense Multiple Access with Collision Detection) method which is one accessing method of a LAN (Local Area Network).
2. Description of the Related Art
In a LAN, since a bus contention control is introduced to avoid collisions of data being sent out from a plurality of terminal apparatus, a CSMA/CD method is frequently used as an accessing method. A communication system by a conventional communication control apparatus adopting the CSMA/CD method is described with reference to FIG. 1 and FIG. 2.
FIG. 1 is a schematic view showing an example of a connection between conventional communication apparatus 2, 3, 4 and 5 (hereinafter referred to as A, B, C and D units) each having a bus contention control function by the CSMA/CD accessing method, and a common data line 1. The units 2, 3, 4 and 5 are respectively connected to the common data line 1 through transmitting lines designated by reference numerals 6, 8, 10 and 12, and receiving lines designated by the reference numerals 7, 9, 11 and 13 in the figure, thus constituting a communication system.
An example of a communication format used in such a communication system is shown in a schematic view of Fie. 2. The communication format shown in FIG. 2 is a format published by the U.S. Automobile Engineering Association as SAE-J 1850.
This communication format is constituted by a transmit start mark 14 which transfers a transmit start to all of the units connected to the common data line 1, a priority code 15 which decides priority at the time of collision in a bus contention control method, destination address 16 showing a transmitting destination, a source address 17 showing a transmitting source, a communication data area 18, an error detection code (hereinafter, referred to as a CRC) 18b showing the CRC operation result from the first bit of the priority code 15 to a final bit of the communication data area 18, an area (hereinafter, referred to as an EOD) 19 showing completion of communication data, an area (hereinafter referred to as an IFR) 20 which is replied to a transmitting unit when normally received at a receiving unit, and an area (hereinafter, referred to as an EOF) 21 showing completion of a communication frame. The priority code 15, destination address 16 and source address 17 are generally called a communication control area 22.
Hereupon, a specific communicating procedure in the case where the A unit 2 sends out the transmitting frame to the common data line 1 against the D unit 5 in FIG. 1 is described.
Inherent addresses (hereinafter, referred to as the source address or inherent data) are allocated respectively to the units 2, 3, 4 and 5 connected to the common data line 1. Thus, when the A unit 2 transfers data to the D unit 5, as shown in FIG. 2, the destination address 16 in the transmitting frame 50 sent by the A unit 2 becomes the source address of the D unit 5. And, as shown in FIG. 2, the D unit 5 conducts receiving processing i.e., operates in a receiving mode when the destination address 16 in a frame 49 on the common data line 1 coincides with the source address allocated to itself. Also, the source address 17 in the transmitting frame 50 sent by the A unit 2 becomes the source address allocated to the A unit 2. Thereby, the A unit 2 informs the D unit 5 that the transmitting source of the transmitting frame 49 on the common data line 1 is the A unit 2 itself.
In such a manner, as shown in FIG. 2, when the A unit 2 sends out all data constituting the transmitting frame 50 to the common data line 1, the D unit 5, when receiving normally, after detecting the EOD 19, replies with the source address of its own with the IFR 20 as a reply IFR 53 as shown in FIG. 2. And, when the EOF 21 showing the completion of communication frame is detected, the transmission of one communication frame is completed.
In a manner described above, the frame 49 as shown in FIG. 2 is sent to the common data line 1.
Next, a bit format, in which a signal representing bits of "1" or "0" constituting the aforementioned communication format is subjected to pulse width modulation (hereinafter, referred to as a PWM), is described with reference to a wave-form diagram of FIG. 3.
An area 26 of each one bit is constituted by a first time 23, a second time 24 and a third time 25. As shown in FIG. 3(a), the bit "1" is so represented that, the first time 23 is high level (hereinafter, referred to as "H" ), and the second time 24 and the third time 25 are low level (hereinafter, referred to as "L"). The bit "0" is so represented that, as shown in FIG. 3(b), the first time 23 and the second time 24 are given at "H" and the third time 25 is "L". A row of bits constitutes a byte.
Next, the operation of the bus contention control using the communication format described above is described with reference to a timing chart of FIG. 4 and a wave-form diagram of FIG. 5.
As shown in FIGS. 4(b) and (c), when the A unit 2 and the B unit 3 simultaneously send out the transmitting frames 50 and 51 to the common data line 1, though the bus contention control detects the collisions by the priority codes 15 of the transmitting frames 50 and 51, priority of the common data line 1 is competed in this case.
Here, a timing chart of the communication when the A unit 2 obtains the priority and sends the transmitting frame 50 as shown in FIG. 4(b) is shown. Though the C unit 4 replies the IFR 20 as the reply IFR 52 as shown in FIG. 4(d) this is because that the destination address 16 in the transmitting frame 50 of the A unit 2 coincides with the source address of the C unit 4, and the C unit 4 moves to the receiving processing and detects the normal receiving.
An area of the priority code 15 in this case is shown in FIG. 5 with reference to the bit format.
Here, it is assumed that wave forms of the units output "H" as the signal level appear on the common data line 1. That is, outputs from the units 2, 3, 4 and 5 become the wired OR wave forms on the common data line 1.
In an example shown in FIG. 5, the A unit 2 sends out a "00(H)" (here, (H) indicates a hexadecimal) 62 to the common data line 1 having the specification as stated above, as the priority code 15 as shown in FIG. 5(b), and the B unit 2 sends out a "0F(H)" 63 as shown in FIG. 5(c). Now, since the "00(H)" is "00000000" in a binary code and the "0F(H)" is "00001111", as shown in FIG. 5, the collision occurs at a Fifth bit of the priority code 15 sent out respectively by the A unit 2 and the B unit 3. In this case, the wave form having longer "H" level, or the "H" level of the fifth bit of the wave Form 62 outputted from the A unit 2 shown in FIG. 5(b) appears on the common data line 1, as a wave form 61 of the priority code 15 as shown in FIG. 5(a).
While, in this case, the B unit 3 detects that the wave form 63 of "0F(H)" outputted by itself does not appear on the common data line 1, by comparing a wave form inputted to itself from the common data line 1 via the receiving line 9, with a wave form outputted to the common data line 1 by itself (hereinafter, referred to as an echo back comparison) to detect the collisions, and stops to send out the transmitting frame 51 thereafter as shown in FIG. 4(c).
The bus contention control is realized in the above-mentioned manner.
A communication system using the bus contention control as described above, may also employ a communication method called a multiple address communication. In the following, the multiple address communication is described according to a timing chart of the communication example shown in FIG. 6.
Now, assuming that the A unit 2 in FIG. 1 transmits the same data simultaneously to all of the other units, that is, the B unit 3, C unit 4 and D unit 8 connected to the common data line 1, as the destination address 16 of the transmitting frame 50 of the A unit 2 shown in FIG. 6(b), a multiple address communication code decided in the communication system in advance is outputted. For example, in the case of communication system in which all of the other units are designed to receive when "FF(H)" is outputted as the destination address, the "FF(H)" becomes the multiple address communication code. And, the B unit 3, C unit 4 and D unit 5 connected to the common data line 1 switch to the receiving made (hereinafter, referred to as a multiple address receiving) at the time point when it detects that the destination address of the transmitting frame 50 outputted from the A unit 2 to common data line 1 is the "FF(H)".
The B unit 3, C unit 4 and D unit 5 thusly switched to the multiple address receiving processing never reply the IFR 20 as shown in FIG. 6(a), regardless of occurrence of the receiving errors, even when the EOD 19 indicating the completion of communication data of the transmitting frame is detected because, even when a plurality of receiving units reply the IFR 20 simultaneously, they collide with each other on the common data line 1. Thus the replies are meaningless for the transmitting units which attempt to acknowledge receipt.
In the conventional communication system by the CSMA/CD method, the multiple address communication takes place as mentioned above, so that the transmitting unit could not find out the occurrence of errors on the receiving unit side (i.e. detected by units in the receiving mode) within one message frame.
Also, as another problem, it was difficult to retrieve respective source addresses of a number of units connected to the common data line from one specific unit. This results in inconvenience when the unit is added and connected newly to the common data line.